﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using YanZhiwei.DotNet3._5.Utilities.Common;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using YanZhiwei.DotNet3._5.UtilitiesTests.Model;
using YanZhiwei.DotNet3._5.Utilities.Base;
namespace YanZhiwei.DotNet3._5.Utilities.Common.Tests
{
    [TestClass()]
    public class LambdaHelperTests
    {
        [TestMethod()]
        public void DistinctTest()
        {
            var _source = new Person[] {new Person{ Age = 1, Name = "YanZhiwei"},
                                      new Person{ Age = 2, Name = "yanzhiwei"}};
            var _actual = _source.Distinct(c => c.Name, StringComparer.InvariantCultureIgnoreCase);
            Assert.IsTrue(_actual.Count() == 1);
            
        }

    }
}
